
#include<stdio.h>
typedef long long LL;
int n, k;
int a[1000005];
bool check(int x)
{
	LL y = 0;
	for (int i = 1; i <= n; i++)
	{
		y += a[i] / x;
	}
	return y >= k;
}
int find()
{
	int l = 0;
	int r = 1e8 + 1;
	while (l+1<r)
	{
		int mid = l + r >> 1;
		if (check(mid))
		{
			l = mid;
		}
		else
		{
			r = mid;
		}
	}
	return l;
}
int main()
{
	scanf("%d%d", &n, &k);
	for (int i = 1; i <= n; i++)
	{
		scanf("%d", & a[i]);
	}
	printf("%d\n", find());
}